Clears entire form or specified fields.

<div class="definition">
    clear([field1, field2, ...])
</div>

Returns <i>undefined</i>.

<h4>Description</h4>

If no arguments are provided, clears <a class="method" href="w2form.record">.record</a> object, sets <a class="method" href="w2form.recid">.recid</a> to 0, removes all tags and resets fields on the screen to a blank state.
<div style="height: 10px"></div>

If arguments are provided, only those fields are cleared.
<div style="height: 10px"></div>

If you have the form defined in the following way:
<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    recid    : 10,
    url      : '/server/url',
    formURL  : '/server/path',
    fields: [
        { field: 'first_name', type: 'text', required: true },
        { field: 'last_name', type: 'text', required: true },
        { field: 'email', type: 'email' }
    ],
    record: {
        first_name : 'John',
        last_name  : 'Doe',
        email      : 'jdoe@email.com'
    },
    actions: {
        "save": function () { this.validate(); },
        "reset": function () { this.clear(); }
    },
    postData: [
        param1 : 'value1',
        param2 : 'value2'
    ]
});
</textarea>

You can do
<textarea class="javascript">
w2ui.form.clear();
</textarea>

Or
<textarea class="javascript">
w2ui.form.clear('email', 'last_name');
</textarea>
